export default {
	data() {
		return {
			share: {
				title: '岩搜搜',
				path: `/pages/index/login`,
				imageUrl: '',
				desc: '',

			}
		}
	},
	// 分享到微信好友功能
	onShareAppMessage(res) {
		console.log(res,"onShareAppMessage");
		return {
			title: '岩搜搜',
			path: '/pages/index/login' + "?data=" + JSON.stringify(uni.getStorageSync('types')) + '&utype=' + uni.getStorageSync("identity_id") + '&mobile=' + uni.getStorageSync("mobile")  +
				'&pid=' + uni.getStorageSync("user")?.userinfo?.id ,
			desc: this.share.desc,
			imageUrl: this.share.imageUrl,
			success(res) {
				uni.showToast({
					title: '分享成功'
				})
				
				console.log(this.share.path,"分享瑞金");
			},
			fail(res) {
				uni.showToast({
					title: '分享失败',
					icon: 'none'
				})
				console.log(this.share.path,"分享失败");
			}
		}
	},
	// 分享到朋友圈功能
	onShareTimeline(res) {
		return {
			title: this.share.title,
			path: '/pages/index/login' + "?data=" + JSON.stringify(uni.getStorageSync('types')) + '&utype=' + uni.getStorageSync("identity_id") +
				'&pid=' + uni.getStorageSync("user")?.userinfo?.id  + '&mobile=' + uni.getStorageSync("mobile"),
			desc: this.share.desc,
			imageUrl: this.share.imageUrl,
			success(res) {
				uni.showToast({
					title: '分享成功'
				})
				console.log(this.share.path,"分享瑞金");
			},
			fail(res) {
				uni.showToast({
					title: '分享失败',
					icon: 'none'
				})
				console.log(this.share.path,"分享失败");
			}
		}
	},

}